
package com.example.nacosconsumer.fallback;

import com.example.nacosconsumer.client.TestService;

/**
 * sentinel 降级处理
 */
public class EchoServiceFallback implements TestService {

	private Throwable throwable;

	EchoServiceFallback(Throwable throwable) {
		this.throwable = throwable;
	}

	/**
	 * 调用服务提供方的输出接口.
	 * @param name 用户输入
	 * @return
	 */
	@Override
	public String hello(String name) {
		return "consumer-fallback-default-str" + throwable.getMessage();
	}
}
